package com.k.designpattern.creational.builder.buildercontext;

public class PersonBuilder {
    private String id;
    private String name;

    public PersonBuilder() {
    }

    public PersonBuilder setId(String id) {
        this.id = id;
        return this;
    }

    public PersonBuilder setName(String name) {
        this.name = name;
        return this;
    }

    public Person build() {
        return new Person(this.id, this.name);
    }

    public static PersonBuilder create() {
        return new PersonBuilder();
    }
}
